package com.ncucoder.client.model;

import com.ncucoder.client.constant.OrderConstants;

import java.sql.Timestamp;

/**
 * Order model
 *
 * @author <a href="https://www.ncucoder.com">hsowan</a>
 * @since 2019-01-17 21:58
 */
public class Order{

    /**
     * Primary key in database
     */
    private Long id;

    /**
     * The order name
     */
    private String name;

    /**
     * Indicate the status of the order
     * 0 : CREATE
     * 1 : DONE
     * 2 : CANCEL
     * @see OrderConstants
     */
    private Integer status;

    /**
     * The time when create the order
     */
    private Timestamp createTime;

    /**
     * the time when update the status of the order
     */
    private Timestamp updateTime;

    /**
     * Unique message id
     */
    private String messageId;

    public Order() {
    }

    public Order(Long id, String name, Integer status, Timestamp createTime, Timestamp updateTime, String messageId) {
        this.id = id;
        this.name = name;
        this.status = status;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.messageId = messageId;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }

    public String getMessageId() {
        return messageId;
    }

    public void setMessageId(String messageId) {
        this.messageId = messageId;
    }

    @Override
    public String toString() {
        return "Order{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", status=" + status +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", messageId='" + messageId + '\'' +
                '}';
    }
}
